<template>
    <div>
        <p v-for="item in ss" :key="item.id">
            <input type="checkbox" :checked="item.isdone" 
            @click="add(item.isdone,item.id)">
            <span>{{ item.name }}</span>
        </p>
    </div>
</template>

<script>
export default {
    props: {
        ss: {
            String
        }
    },
    components: {

    },
    data() {
        return {


        }
    },
    methods: {
        add(value,index) {
            for(let item of this.ss){
                if(item.id==index){
                    item.isdone=!value
                }
            }
        }
    }
}
</script>

<style>

</style>